package org.dromara.nav.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.nav.domain.OsProject;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 开源项目视图对象 os_project
 *
 * @author LSY
 * @date 2025-11-13
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = OsProject.class)
public class OsProjectVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 项目ID
     */
    @ExcelProperty(value = "项目ID")
    private Long projectId;

    /**
     * 项目名称
     */
    @ExcelProperty(value = "项目名称")
    private String projectName;

    /**
     * 项目编码（唯一）
     */
    @ExcelProperty(value = "项目编码", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "唯=一")
    private String projectCode;

    /**
     * Logo URL
     */
    @ExcelProperty(value = "Logo URL")
    private String logo;

    /**
     * 官网地址
     */
    @ExcelProperty(value = "官网地址")
    private String website;

    /**
     * 源码地址（Git/Gitee）
     */
    @ExcelProperty(value = "源码地址", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "G=it/Gitee")
    private String sourceUrl;

    /**
     * 在线演示地址
     */
    @ExcelProperty(value = "在线演示地址")
    private String demoUrl;

    /**
     * 项目简介
     */
    @ExcelProperty(value = "项目简介")
    private String description;

    /**
     * 开源协议
     */
    @ExcelProperty(value = "开源协议")
    private String license;

    /**
     * 主要语言
     */
    @ExcelProperty(value = "主要语言")
    private String lang;

    /**
     * 最后提交时间
     */
    @ExcelProperty(value = "最后提交时间")
    private Date lastCommit;

    /**
     * Star 数
     */
    @ExcelProperty(value = "Star 数")
    private Long starCount;

    /**
     * Fork 数
     */
    @ExcelProperty(value = "Fork 数")
    private Long forkCount;

    /**
     * 下载/使用次数
     */
    @ExcelProperty(value = "下载/使用次数")
    private Long downloadCount;

    /**
     * 排序
     */
    @ExcelProperty(value = "排序")
    private Long sort;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 状态（0正常 1停用）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
    private String status;


}
